const DownloadStatus = {
    Init: 'init',
    Preparing: 'preparing',
    Parsing: 'parsing',
    Downloading: 'downloading',
    DownloadFail: 'download-fail',
    Merging: 'merging',
    MergeFail: 'merge-fail',
    Success: 'success',
    Stopping: 'stopping',
    Stopped: 'stopped',
    Error: 'error',
};

const finishStatusList = [
    DownloadStatus.DownloadFail,
    DownloadStatus.MergeFail,
    DownloadStatus.Success,
    DownloadStatus.Stopped,
    DownloadStatus.Error,
];
function isFinishStatus(status) {
    return finishStatusList.includes(status);
}

module.exports = {
    DownloadStatus,
    isFinishStatus,
};
